<!DOCTYPE html>
<html lang="en">

<head>
  
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title> EsLint</title>

  <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
  <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  <script src="./build/entry.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
  <link type="text/css" rel="stylesheet" href="styles/app.min.css">
  <link type="text/css" rel="stylesheet" href="styles/iframe.css">
  <link type="text/css" rel="stylesheet" href="">
  <script async defer src="https://buttons.github.io/buttons.js"></script>

  
</head>



<body class="layout small-header">
    <div id="stickyNavbarOverlay"></div>
    

<div class="top-nav">
    <div class="inner">
        <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
        </a>
        <div class="logo">
             
                <a class="image" href="index.html">
                    <img src="images/logo.png" alt="logo">
                </a>
            
             
                <a href="index.html">
                    <h1 class="navbar-item">vue-base-admin</h1>
                </a>
            
        </div>
        <div class="menu">
            
            <div class="navigation">
                <a
                    href="index.html"
                    class="link"
                >
                    API Documentation
                </a>
                
                <div class="dropdown is-hoverable is-right">
                    <a class="dropdown-trigger link">
                        Tutorials
                        <i class="fas fa-chevron-down fa-xs"></i>
                    </a>
                    <div class="dropdown-menu">
                        <div class="dropdown-content">
                        
                            <a class="dropdown-item" href="tutorial-EsLint.html">
                                EsLint
                            </a>
                        
                            <a class="dropdown-item" href="tutorial-入门.html">
                                入门
                            </a>
                        
                        </div>
                    </div>
                </div>
                
                
                
            </div>
        </div>
    </div>
</div>
    <div id="main">
        <div
            class="sidebar tutorials"
            id="sidebarNav"
        >
            
            <nav>
                
                    <div class="category"><h3>Tutorials</h3><ul><li><a href="tutorial-EsLint.html">EsLint</a></li><li><a href="tutorial-入门.html">入门</a></li></ul></div>
                
            </nav>
        </div>
        <div class="core" id="main-content-wrapper">
            <div class="content">
                <header class="page-title">
                    <p>Tutorial</p>
                    <h1>EsLint</h1>
                </header>
                <section>

<article>
    <p>此框架加入了一些esLint规则，配置在 package.json.eslintConfig 中；</p>
<p>这些规则能让你的代码更规范 更利于维护。当然如果不喜欢可以手动去掉。</p>
<ul>
<li>&quot;off&quot;或0-关闭规则</li>
<li>&quot;warn&quot;或1-将该规则作为警告打开（不影响退出代码）</li>
<li>&quot;error&quot;或2-将规则作为错误打开（退出代码将为1）</li>
</ul>
<table>
<thead>
<tr>
<th>规则</th>
<th>作用</th>
</tr>
</thead>
<tbody>
<tr>
<td>no-console</td>
<td>“控制台”选项 （代码中是否允许console 的存在）</td>
</tr>
<tr>
<td>no-debugger</td>
<td>“debugger”选项（代码中是否允许debugger 的存在）</td>
</tr>
<tr>
<td>no-dupe-args</td>
<td>禁止在<code>function</code>定义中重复参数</td>
</tr>
<tr>
<td>no-dupe-else-if</td>
<td>在if-else-if链中禁止重复条件</td>
</tr>
<tr>
<td>no-dupe-keys</td>
<td>禁止在对象文字中使用重复键</td>
</tr>
<tr>
<td>no-empty</td>
<td>禁止空块语句</td>
</tr>
<tr>
<td>no-unreachable</td>
<td>在return，throw，continue和break语句之后禁止无法访问的代码</td>
</tr>
<tr>
<td>block-scoped-var</td>
<td>在定义变量的范围内强制使用变量</td>
</tr>
<tr>
<td>no-empty-function</td>
<td>禁止空函数</td>
</tr>
<tr>
<td>no-eval</td>
<td>禁止使用<code>eval（）</code></td>
</tr>
<tr>
<td>no-redeclare</td>
<td>禁止变量重新声明</td>
</tr>
<tr>
<td>indent</td>
<td>强制一致的缩进</td>
</tr>
<tr>
<td>max-lines</td>
<td>强制每个文件最大行数</td>
</tr>
<tr>
<td>max-lines-per-function</td>
<td>强制执行函数中的最大代码行数</td>
</tr>
<tr>
<td>max-nested-callbacks</td>
<td>强制回调可以嵌套的最大深度</td>
</tr>
<tr>
<td>new-cap</td>
<td>要求构造函数名称以大写字母开头</td>
</tr>
<tr>
<td>no-bitwise</td>
<td>禁止按位运算符</td>
</tr>
<tr>
<td>no-multiple-empty-lines</td>
<td>禁止多个空行</td>
</tr>
<tr>
<td>quotes</td>
<td>强制使用反引号，双引号或单引号的一致使用</td>
</tr>
<tr>
<td>no-duplicate-imports</td>
<td>禁止重复的模块导入</td>
</tr>
<tr>
<td>no-var</td>
<td>需要<code>let</code>或<code>const</code>而不是<code>var</code></td>
</tr>
<tr>
<td>semi</td>
<td>要求或禁止使用分号</td>
</tr>
<tr>
<td>comma-dangle</td>
<td>要求或禁止使用拖尾逗号</td>
</tr>
<tr>
<td>no-unused-vars</td>
<td>消除未使用的变量，函数和函数的参数。</td>
</tr>
</tbody>
</table>
<ul>
<li>
<p>max-lines 说明：</p>
<p>该规则强制每个文件最大行数，以帮助维护和降低复杂性。</p>
<p><font color='red'> 这里设置了每个文件的最大行数不应该超过666行，如果大于666行，请合理的拆分组件 </font></p>
<p>请注意，如果文件以换行符结尾，大多数编辑器将在末尾显示一个额外的空行。此规则不计入额外的行数。
选项：</p>
<p>&quot;max&quot;（默认300）强制文件中的最大行数</p>
<p>&quot;skipBlankLines&quot;: true 忽略纯粹由空格组成的行。</p>
<p>&quot;skipComments&quot;: true 忽略仅包含注释的行</p>
<p><a href="https://eslint.org/docs/rules/max-lines">更多max-lines配置</a></p>
</li>
<li>
<p>max-lines-per-function 说明：</p>
<p>该规则强制每个函数的最大行数，以帮助维护和降低复杂性。</p>
<p><font color='red'>这里设置了每个函数的最大行数不应该超过80行，如果大于80行，请考虑拆分函数</font></p>
<p><a href="https://eslint.org/docs/rules/max-lines-per-function">更多max-lines-per-function配置</a></p>
</li>
</ul>
<p><a href="https://eslint.org/docs/rules/">EsLint规则传送门</a></p>
</article>

</section>

            </div>
            
            <footer class="footer">
                <div class="content has-text-centered">
                    <p>感谢 <a href="https://github.com/jsdoc3/jsdoc">JSDoc </a>开发出这么好用的文档工具</p>
                    <p class="sidebar-created-by">
                        <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by 
                        <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
                    </p>
                </div>
            </footer>
            
        </div>
        <div id="side-nav" class="side-nav">
        </div>
    </div>
<script src="scripts/app.min.js"></script>
<script>PR.prettyPrint();</script>
<script src="scripts/linenumber.js"> </script>

</body>
</html>